package com.fyt.video.project.controller;

import com.fyt.video.project.pojo.Device;
import com.fyt.video.project.util.VideoUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class VideoController {
    @Autowired
    private VideoUtil videoUtil;

    @GetMapping(value = "play")
    public String video(Device device,String name){
        videoUtil.startTranscodeAndGetTask(device,name);
        return null;
    }

    @GetMapping(value = "stop")
    public String stop(String name){
        videoUtil.stopTranscoding(name);
        return null;
    }
}
